package com.pojo.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pojo.parent.BaseEntity;
import com.utility.constant.MessageConstant;
import com.utility.gruops.InsertGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author hewei
 * @since 2020-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("system_template")
public class SystemTemplateEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单名
     */
    @NotNull(groups = InsertGroup.class, message = "菜单名"+MessageConstant.NULL_MESSAGE)
    private String name;

    /**
     * 菜单路由
     */
    private String path;

    /**
     * 菜单标签
     */
    private String label;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 菜单索引
     */
    private Short sort;

    /**
     * 树级id集合
     */
    private String treeLevelId;

    /**
     * 上级id 0表示顶级id
     */
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long parentId;



}
